<?php
require_once "../../config.php";
require_once $lib_path."filter.php";
require_once $lib_path."FBMethod.php";

$fb = new FBMethod();
$posts = array();

if($_POST['PAGE_UNTIL']==''){	
	$data = $fb->getPosts(&$beauty_posts,$fb_base_url,$_POST['ID']);
}
else{	
	$data = $fb->getPosts(&$beauty_posts,$fb_base_url,$_POST['ID'],urlencode($_POST['PAGE_UNTIL']));
}

if($data){
	$posts = $data['data'];
	$paging = $data['paging']['next'];
	$page_until = substr($data['paging']['next'], strpos($data['paging']['next'], "&until")+7);
	
	//echo '<div class="width100 alignCenter">';
	foreach($posts as $term=>$detail){			
		if(isset($detail['picture'])){
			echo '<a href="">';
				echo '<img class="" src="'.$detail['picture'].'" width="90px" height="90px" />';
				//echo '<img class="" src="a_about.gif" width="90px" height="90px" />';					
			echo '</a>';
		}
	}
	//echo '</div>';
	echo '<div id="next_page" class="alignCenter"><span style="cursor: pointer; cursor: hand;" onclick="getMoreBeauty(\''.$data['next_id'].'\',\''.$page_until.'\')">看更多</span></div>';
}
else{
	echo '<div id="next_page" class="alignCenter">無更多資料</div>';
}


?>